package com.cjw.campus.system.controller;

import com.cjw.campus.core.result.JsonResult;
import com.cjw.campus.system.entity.MatriculationYearTable;
import com.cjw.campus.system.service.IMatriculationYearTableService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 入学年份表 前端控制器
 * </p>
 *
 * @author cjw
 * @since 2023-02-28
 */
@RestController
@RequestMapping("/system/matriculationYearTable")
@Tag(name = "年级管理接口")
public class MatriculationYearTableController {

    @Autowired
    private IMatriculationYearTableService matriculationYearTableService;

    @GetMapping("/list")
    @Operation(summary = "查询所有年级", security = { @SecurityRequirement(name = "Authorization")})
    public JsonResult list () {
        List<MatriculationYearTable> list = matriculationYearTableService.list();
        return JsonResult.ok(list);
    }

}
